<?php

namespace common\models\db;

use Yii;

/**
 * This is the model class for table "reviews".
 *
 * @property integer $id
 * @property string $name
 * @property string $description
 * @property string $email
 * @property string $phone
 * @property integer $active
 * @property integer $home
 * @property integer $createTime
 * @property integer $updateTime
 */
class Reviews extends \yii\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'reviews';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['name', 'description', 'email', 'phone', 'active', 'home', 'createTime', 'updateTime'], 'required'],
            [['active', 'home', 'createTime', 'updateTime'], 'integer'],
            [['name', 'description', 'email'], 'string', 'max' => 255],
            [['phone'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'description' => 'Description',
            'email' => 'Email',
            'phone' => 'Phone',
            'active' => 'Active',
            'home' => 'Home',
            'createTime' => 'Create Time',
            'updateTime' => 'Update Time',
        ];
    }

    public function attributes() {
        return array_merge(parent::attributes(), ['images']);
    }

}
